﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="msg.aspx.cs" Inherits="ZF.WS.expert.msg" %>

<%@ Register Src="/UserControls/vcodeimg.ascx" TagName="vcodeimg" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="/css/common.css" rel="stylesheet" type="text/css" />
    <link href="/css/css.css" rel="stylesheet" type="text/css" />
    <link href="/css/default.css" rel="stylesheet" type="text/css" />

    <script src="/js/jQuery.js" type="text/javascript"></script>
  <style>
        * { margin: 0px; padding: 0px; font-size: 12px; list-style: none; font-family: 宋体,arial,verdana,sans-serif,fantasy,tahoma; }
    </style>
</head>
<body>

    <script language='javascript' type="text/javascript">

        $(function() {

            $(document.forms[0]).submit(function() {
                if ($(".tbContact").val() == "") {
                    alert("请输入留言内容");
                }
                if ($(".tbVCode").val() == "") {
                    alert("请输入验证码 ");
                }

            });
            window.top.window._commentHeightSet($(document).height());
        });
    </script>

    <form id="form1" runat="server">
    <div>
        <style>
            * { margin: 0px; padding: 0px; }
            .edit td.l { background: #fafafa; }
            .edit td.r { background: #fff; }
        </style>
        <style>
            .comment { }
            .comment dl { border: 1px solid #eee; }
            .comment dt { height: 30px; line-height: 30px; border-bottom: 1px dashed #eee; }
            .comment dd { padding: 10px 30px; }
        </style>
        <div class="commentc" style="height: 200px; overflow: scroll;">
            <div class="comment">
                <zf:ListView runat="server" ID="lvList">
                    <LayoutTemplate>
                        <div style="">
                            <zf:PlaceHolder ID="itemPlaceHolder" runat="server">
                            </zf:PlaceHolder>
                        </div>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <dl>
                            <dt><span class="fl_  "><span class="zx_">&nbsp;&nbsp;&nbsp;&nbsp;网友</span>
                                <%#Eval("Contact")%></span> <span class="fr_"><span class="zx_">Ip</span>
                                    <%#Eval("Ip")%>
                                    <span class="zx_">留言时间</span>
                                    <%#Eval("AddTime")%>&nbsp;&nbsp;&nbsp;&nbsp;<%--<a href="javascript:" class="yy">引用</a>&nbsp;&nbsp;<a
                                        href="javascript:" class="hf">回复&nbsp;&nbsp;&nbsp;&nbsp;</a>--%></span></dt>
                            <dd>
                                <span class="fc2">留言内容：-------------------------------</span></br><br />
                                <%#((string)Eval("PContent")).EmptyString("").Replace("\r\n", "</br>")%>
                                
                                <div class="<%#((string)Eval("RContent"))==null?"dn_":"" %>">
                                <br /><br />
                                <span class="fc2">回复内容：-------------------------------</span></br>
                                <%#((string)Eval("RContent")).EmptyString("").Replace("\r\n", "</br>")%>
                                </div>
                                
                            </dd>
                        </dl>
                    </ItemTemplate>
                </zf:ListView>
            </div>
        </div>

        <script>
            if ($(".comment").height() < $(".commentc").height()) {
                if ($(".comment").height() > 0) {
                    $(".commentc").height($(".comment").height() + 20)
                } else {
                    $(".commentc").height(0);
                }
            }
        </script>

        <script>
            $(".yy").click(function() {
                $(".tbContent").val(
                "引有内容:\r\n--------------------------------------------\r\n" +
                $(this.parentNode.parentNode.parentNode.parentNode).find("dd").html() +
                "\r\n--------------------------------------------\r\n");
            });
            $(".hf").click(function() {
                $(".tbContent").val(
                "\r\n--------------------------------------------\r\n" +
                $(this.parentNode.parentNode.parentNode.parentNode).find("dd").html() +
                "\r\n--------------------------------------------\r\n");
            });
        </script>

        <table style="width: 100%" class="  edit edit1">
            <tr>
                <td class="l">
                    <span class="xh_">*</span>留言内容:
                </td>
                <td class="r">
                    <zf:TextBox runat="server" ID="tbContant" TextMode="MultiLine" class="mltxt" Style="height: 100px"></zf:TextBox>
                </td>
            </tr>
            <tr>
                <td class="l">
                    我的姓名:
                </td>
                <td class="r">
                    <zf:TextBox runat="server" ID="tbContact" class="stxt"></zf:TextBox>
                </td>
            </tr>
            <tr>
                <td class="l">
                    我的联系方式:
                </td>
                <td class="r">
                    <zf:TextBox runat="server" ID="tbCType" class="ltxt"></zf:TextBox>
                </td>
            </tr>
            <tr>
                <td class="l">
                    <span class="xh_">*</span>验证码:
                </td>
                <td class="r">
                    <div class="c">
                        <uc1:vcodeimg ID="vcodeimg1" runat="server" />
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <div style="text-align: right; padding-right: 10px;">
                        <zf:Button ID="btAdd1" class="linkbtn addSubmit" runat="server" OnClick="Submit"
                            Text=" 提交留言 "></zf:Button>
                        <input type="button" class="linkbtn rw" value=" 重 写 " />
                    </div>

                    <script>
                        $(".rw").click(function() {
                            window.location = "<%=Request.Url %>";
                        });
                    </script>

                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
